package com.ssy.lingxi.order.model.bo;

import java.io.Serializable;
import java.util.Objects;

/**
 * 订单商品Id与SkuId
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-30
 */
public class OrderProductBO implements Serializable {
    private static final long serialVersionUID = -130331678878032038L;

    public OrderProductBO(Long productId, Long skuId) {
        this.productId = productId;
        this.skuId = skuId;
    }

    /**
     * 商品Id
     */
    private Long productId;

    /**
     * 商品SkuId
     */
    private Long skuId;

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        OrderProductBO that = (OrderProductBO) o;
        return productId.equals(that.productId) && skuId.equals(that.skuId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(productId, skuId);
    }
}
